<docs>
  <docs-title>地图</docs-title>
  <docs-desc> 公共配置：xAxis、yAxis、tooltip、visualMap、series </docs-desc>
 </docs>

<script>
import chart from "../echart.vue";

export default {
  extends: chart,
  data() {
    return {
      commonOptions: null
    };
  },
  created() {
    this.initCommonOptions();
  },
  methods: {
    initCommonOptions() {
      this.commonOptions = {
        xAxis: {
          show: false
        },
        yAxis: {
          show: false
        },
        tooltip: {
          trigger: "item",
          className: "echarts-tooltip-custom"
        },
        visualMap: {
          min: 0,
          max: 100,
          realtime: false,
          calculable: true,
          itemWidth: 12,
          itemHeight: 122,
          // align: "left", // 图例右侧
          // right: 0,
          // bottom: 0,
          inRange: {
            color: ["#BDDFFF", "#0086FF"]
          }
        },
        series: [
          {
            type: "map",
            map: "china",
            aspectScale: 1,
            // zoom: 1,
            // layoutCenter: ["48%", "50%"],
            // layoutSize: "160%",
            label: {
              show: true,
              color: "#fff",
              fontSize: 11
            },
            itemStyle: {
              borderColor: "#fff"
            }
          }
        ]
      };
    }
  }
};
</script>
